package com.crm.system.controller.cluePoolManager;

import com.crm.common.model.DataResponse;
import com.crm.common.model.DhResponse;
import com.crm.common.model.Enum.ResponseCodeEnum;
import com.crm.model.entity.sys.UserAccount;
import com.crm.model.vo.cluePoolManager.CluePoolManagerPeopleVO;
import com.crm.system.service.cluePoolManager.CluePoolManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author luojie
 * @date 2021/1/12 16:07
 */
@RestController
@RequestMapping("/cluePoolManager")
public class CluePoolManagerController {

    @Autowired
    private CluePoolManagerService cluePoolManagerService;

    /**
     * 根据公司id获取线索池管理账号列表(带是否权限管理状态)
     * @param request
     * @return
     */
    @GetMapping("/selectCluePoolManagerPeopleList")
    public DataResponse selectCluePoolManagerPeopleList(HttpServletRequest request,@RequestParam String cluePoolId, @RequestParam String companyId){
        List<CluePoolManagerPeopleVO> userAccounts = cluePoolManagerService.selectCluePoolManagerPeopleList(cluePoolId,companyId);
        return new DhResponse(ResponseCodeEnum.OK.getResponseCode(),userAccounts);
    }

}
